#ifndef TRACK_H
#define TRACK_H

#include <QStringList>
#include <QDateTime>

#include "tag/taghandler.h"

class Track
{
    TagHandler *th;

    //Phonon::MediaSource source;
    QString path;
    QString subPath;

    //Tags
    QString title;
    QString artist;
    QString album;
    int year;
    int track;
    QString albumArtist;
    QString genre;
    QString comment;
    QString composer;
    QString label;
    QString disc;
    QString lyrics;
    QStringList coverPaths;
    QString mbid;
    QString fingerprint;

    //audio properties
    int length;
    int bitrate;
    int freq;
    int channel;
    int bpm;

    //file properties
    QDateTime lastMod;
    QDateTime lastPlay;
    qint64 filesize;
    QString filetype;

    //media library properties
    double rating;
    double plays;

public:

    Track();
    Track(QString s);

    //Phonon::MediaSource getSource();
    QString getPath();

    //Tags
    QString getTitle();
    QString getArtist();
    QString getAlbum();
    QString getAlbumArtist();
    QString getGenre();
    QString getComposer();
    QString getLabel();
    int getYear();
    int getTrack();
    QString getComment();
    QString getDisc();
    QString getLyrics();
    QString getMbid();
    QString getFingerprint();
    QStringList getCoverPaths();

    //audio properties
    int getLength();
    int getBitrate();
    int getChannel();
    int getFreq();
    int getBpm();

    //file properties
    QDateTime getLastMod();
    QDateTime getLastPlay();
    qint64 getFileSize();
    QString getFileType();

    //media library properties
    double getRating();
    double getPlays();

    //void setSaveSource(Phonon::MediaSource source);

    void setSaveArtist(QString artist);
    void setSaveTitle(QString title);
    void setSaveAlbum(QString album);
    void setSaveAlbumArtist(QString albumArtist);
    void setSaveGenre(QString genre);
    void setSaveComposer(QString composer);
    void setSaveLabel(QString label);
    void setSaveComment(QString comment);
    void setSaveDisc(QString disc);
    void setSavePuid(QString puid);
    void setSaveLyrics(QString lyrics);
    void setSaveFingerprint(QString fingerprint);
    void setSaveTrack(int track);
    void setSaveYear(int year);

    void setSaveRating(double rating);
    void setSavePlays(double plays);
};

#endif // TRACK_H
